package org.apache.commons.lang;

public class StringUtils {

	public static boolean isEmpty(String str) {
		return str == null || str.length() == 0;
	}

	public static boolean isBlank(String str) {
		int strLen;
		if (str == null || (strLen = str.length()) == 0) {
			return true;
		}
		for (int i = 0; i < strLen; i++) {
			if ((isWhitespace(str.charAt(i)) == false)) {
				return false;
			}
		}
		return true;
	}

	private static boolean isWhitespace(char character) {
		return character == ' ' || character == '\r' || character == '\n' || character == '\t';
	}
}
